<template>
	<view>
		<!-- #ifdef MP -->
		<!-- 小程序导航栏 -->
		<view class="flex align-center fixed-top" style="background-color: #F6F7F8;height: 44px;">
			<view class="flex flex-1 px-1 ml-2 rounded-circle " style="background-color: #fff;color: #959FA0;">
				<text class="iconfont iconsousuokuang"></text>
				<text class="align-center mt-1 pl-1">请输入搜索内容</text>
			</view>
		</view>
		<view style="height: 44px;"></view>
		<!-- #endif -->
		
		<!-- 热门分类 -->
		<card title="热门分类" :showRefresh="false">
			 <scroll-view scroll-x="true" class="scroll-row">
			 	<icon-cate v-for="(item,index) in hotList" :key="index" :item="item" :index="index">
				</icon-cate>
			 </scroll-view>
		</card>
		
		<!-- 全部分类 -->
		<card title="全部分类" :showRefresh="false">
			<view class="flex flex-wrap">
				<icon-cate v-for="(item,index) in hotList" :key="index" :item="item" :index="index">
				</icon-cate>
			</view>
		</card>
		
	</view>
</template>

<script>
	import card from '@/components/common/card.vue'; 
	import iconCate from '@/components/common/icon-cate.vue';
	export default{
		components: {
			card,
			iconCate
		},
		data() {
			return {
				hotList:[]
			}
		},
		onLoad() {
		for (let i = 1; i < 10; i++) {
				this.hotList.push({
						name:"分类",
						cover:"/static/demo/cate/1%20("+i+").png"
					})
				}
		},
		methods: {
			
		}
	}
</script>

<style>
</style>
